package cn.ly.easymocktest;

import org.easymock.EasyMockSupport;

/**
 * Created by liuyu21 on 2017/10/21.
 */
public class MockHelloImpl extends EasyMockSupport implements MockHello {

    public void sayHello(String name) {
        System.out.println("hello world," + name);
    }

    public int add(int a, int b) {
        return a + b;
    }

    public User getUserName(String userName){
        Long userid = createNiceMock(Long.class);
        return User.newBuilder()
                .withUserId(userid).withUserName(userName).build();
    }
}
